<div class="ibox float-e-margins">
    <div class="ibox-content" style="display: block;">
        <a class="btn btn-primary " href="{{ route('admin.shop.brand.create')}}">添加品牌</a>

        <table class="table table-hover table-striped">
            <tbody>
            <!--tr-th start-->
            <tr>
                <th>品牌名称</th>
                <th>销售折扣</th>
                <th>操作</th>
            </tr>
            <!--tr-th end-->
            @if(count($shop->brands)>0)
                @foreach($shop->brands as $item)

                    <tr>
                        <td>{{$item->name}}</td>
                        <td>{{$item->pivot->discount}}%</td>
                        <td>
                            <a
                                    class="btn btn-xs btn-primary"
                                    href="{{route('admin.shop.brand.edit',['id'=>$item->pivot->id])}}">
                                <i data-toggle="tooltip" data-placement="top"
                                   class="fa fa-pencil-square-o"
                                   title="编辑"></i></a>
                        </td>
                    </tr>
                @endforeach
            @endif

            </tbody>

        </table>
    </div>